feat(*): Wire clerkUIVersion through all framework packages#7740
feat(*): Wire clerkUIVersion through all framework packages#7740nikosdouvlis merged 9 commits intomainfrom
Conversation
Why: The `clerkUIVersion` prop was typed in `@clerk/shared/types` but never wired through framework packages, making it effectively dead code. Users could pass the prop without TypeScript errors, but it would be silently ignored. This mirrors the existing `clerkJSVersion` functionality for `@clerk/ui`. What changed: - Added `NEXT_PUBLIC_CLERK_UI_VERSION` env var support to Next.js - Added `PUBLIC_CLERK_UI_VERSION` env var support to Astro - Added `VITE_CLERK_UI_VERSION` env var support to React Router and Tanstack Start - Added `CLERK_UI_VERSION` env var support to Express - Added `NUXT_PUBLIC_CLERK_UI_VERSION` env var support to Nuxt - Wired the prop through SSR state for React Router and Tanstack Start
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 1b36a20 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughThis pull request threads a new Clerk UI version field through multiple packages. It adds CLERK_UI_VERSION / NEXT_PUBLIC_CLERK_UI_VERSION environment exposures, introduces clerkUIVersion into environment loaders and runtime config, and propagates clerkUIVersion and clerkUIUrl into provider/state shapes and script URL builders across Astro, Express, Next.js, Nuxt, React Router, and TanStack React Start packages. No control-flow changes; changes are additions to returned objects, constants, types, and config values. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/react-router/src/server/utils.ts (1)
80-103:⚠️ Potential issue | 🟠 MajorAdd tests for clerkUIVersion propagation before merge.
This PR introduces a new runtime configuration path (
__clerkUIVersionin the SSR clerk state), but no tests were added/updated to cover it. Please add a unit or integration test to validate that the env var is correctly read and serialized into the response state.packages/react-router/src/client/types.ts (1)
6-28:⚠️ Potential issue | 🟠 MajorAdd tests for clerkUIVersion env/config propagation.
No tests were added or updated for this multi-framework change (env parsing, runtime config, script URL generation). Please add coverage to ensure the new clerkUIVersion wiring is respected end‑to‑end before merge.
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/astro/src/integration/create-integration.ts`:
- Around line 177-180: The object literal defines PUBLIC_CLERK_UI_VERSION twice;
remove the duplicate entry so only one envField.string({ context: 'client',
access: 'public', optional: true }) remains for PUBLIC_CLERK_UI_VERSION (keep
the existing one at line that first defines PUBLIC_CLERK_UI_VERSION and delete
the later duplicate), ensuring there are no duplicated keys in the mapping
alongside PUBLIC_CLERK_PREFETCH_UI and PUBLIC_CLERK_UI_URL.
Summary
Wire
clerkUIVersionoption through all framework packages to allow specifying a custom@clerk/uiversion.clerkUIVersionto Astro'sAstroClerkIntegrationParamstype🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores